<script>
  //1. 导入uni身份信息管理模块
  import uniIdPagesInit from '@/uni_modules/uni-id-pages/init.js';
  //2. 导入uniIm
  import uniIm from '@/uni_modules/uni-im/sdk/index.js';
  // 3.引入扩展插件（项目默认引入了，扩展插件uniImMsgReader用于展示消息是否已读）
  import MsgReaderExtension from '@/uni_modules/uni-im-msg-reader/extension.js'
  
  // 解决APP端不支持console.time的问题
  const consoleTimeObj = {}
  console.time = function (name) {
    consoleTimeObj[name] = Date.now()
  }
  console.timeEnd = function (name,fun) {
    const time = Date.now() - consoleTimeObj[name]
  }
  
  export default {
    onLaunch: async function() {
      MsgReaderExtension.install()
      uniIdPagesInit();
      uniIm.init();
    },
    onShow: function() {
      console.log('App Show');
    },
    onHide: function() {
      console.log('App Hide');
    }
  };
</script>

<style lang="scss">
  @import './theme/iconfont.css';
  @import './theme/index.css';
  @import "@/uni_modules/uni-im/static/iconfont.css";
</style>
